<template>
    <div class="on-sale-box">
        上架商品
    </div>
</template>

<script>
export default {
    dialog:{
        okButton:'上架'
    },
    props:{
        item:Object
    },
    methods:{
        dialogOk(){

            this.dialog.loading = true;

            this.$ajax({
                url:this.$url({'action':'status'}),
                data:{
                    goods_id:this.item.goods_id,
                    status:'sale'
                },
                success:(data)=>{
                    this.dialog.callback();
                    this.dialog.close();
                },
                over:()=>{
                    this.dialog.loading = false;
                }
            });

            return false;
        }
    }
}
</script>


<style>
.on-sale-box{
    height: 300px;
}

</style>